package com.fqgj.sentry.policy.engine.domain;


import java.io.Serializable;

/**
 * Created by kennykong on 13/07/2017.
 */
public class Condition implements Serializable {

    /**
     * 待计算的变量
     */
    private Variable firstVariable;

    /**
     * 操作
     */
    private String operation;

    /**
     * 第二个参数
     */
    private VariableOrConstant secondVariable;

    /**
     * 是否满足条件
     */
    private Boolean isHit;

    public Condition() {
    }

    public Condition(Variable firstVariable, String operation, VariableOrConstant secondVariable) {
        this.firstVariable = firstVariable;
        this.operation = operation;
        this.secondVariable = secondVariable;
    }

    public String getOperation() {
        return operation;
    }

    public Condition setOperation(String operation) {
        this.operation = operation;
        return this;
    }


    public Boolean getHit() {
        return isHit;
    }

    public Condition setHit(Boolean hit) {
        isHit = hit;
        return this;
    }

    public Variable getFirstVariable() {
        return firstVariable;
    }

    public Condition setFirstVariable(Variable firstVariable) {
        this.firstVariable = firstVariable;
        return this;
    }

    public VariableOrConstant getSecondVariable() {
        return secondVariable;
    }

    public Condition setSecondVariable(VariableOrConstant secondVariable) {
        this.secondVariable = secondVariable;
        return this;
    }
}
